/**
 * VisitType枚举
 *
 * @author sxf
 * @email sxf02615@163.com
 * @date 2025/1/15
 */
package com.sxf.crm.enums;


/**
 * 拜访类型枚举
 */
public enum VisitType {
    PHONE_CALL("电话拜访", "通过电话进行的拜访"),
    ON_SITE("实地拜访", "到客户现场进行的拜访"),
    VIDEO_CALL("视频拜访", "通过视频会议进行的拜访"),
    ONLINE_MEETING("在线会议", "通过在线会议系统进行的拜访"),
    EXHIBITION("展会拜访", "在展会现场进行的拜访"),
    OTHER("其他拜访", "其他类型的拜访");

    private final String displayName;
    private final String description;

    VisitType(String displayName, String description) {
        this.displayName = displayName;
        this.description = description;
    }

    public String getDisplayName() {
        return displayName;
    }

    public String getDescription() {
        return description;
    }

    public static VisitType fromDisplayName(String displayName) {
        for (VisitType type : VisitType.values()) {
            if (type.getDisplayName().equals(displayName)) {
                return type;
            }
        }
        throw new IllegalArgumentException("无效的拜访类型: " + displayName);
    }
} 